package com.bto.solar.work.controller;

import com.bto.solar.work.common.R;
import com.bto.solar.work.service.BtoRolesService;
import com.bto.solar.work.vo.UserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 部门表 前端控制器
 * </p>
 *
 * @author adrian
 * @since 2023-08-09
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private BtoRolesService btoRolesService;

    /**
     * 返回APP管理员角色列表(用户管理-新增/编辑界面）
     */
    @GetMapping("/app-admin")
    public R<List<UserVO.Role>> getRoleList() {
        return R.ok(btoRolesService.getRoleList());
    }

}
